//
//  NetManager.h
//  Api
//
//  Created by 胡先剑 on 16/3/29.
//  Copyright © 2016年 胡先剑. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NetManager : NSObject

/**
 *  查询身份证
 *
 *  @param personId     要查询的身份证编号
 *  @param successBlock 请求数据成功后执行的block 回调
 *  @param failBlock    请求数据失败后执行的block
 */
+ (void)requestInfoByPersonId:(NSString *)personId
                 successBlock:(void(^)(NSString *))successBlock
                    failBlock:(void(^)(NSError *))failBlock;

/**
 *  查询手机号码归属地
 *
 *  @param number       要查询的手机号码
 *  @param successBlock 请求数据成功后执行的block 回调
 *  @param failBlock    请求数据失败后执行的block
 */
+ (void)requestNumber:(NSString *)number
         successBlock:(void (^)(NSString *))successBlock
            failBlock:(void (^)(NSError *))failBlock;

/**
 *  查询天气
 *
 *  @param cityName     查询的地区
 *  @param successBlock 请求数据成功后执行的block 回调
 *  @param failBlock    请求数据失败后执行的block
 */
+ (void)requestWeatherByCityName:(NSString *)cityName
                    successBlock:(void (^)(NSString *result))successBlock
                       failBlock:(void (^)(NSError *error))failBlock;


/**
 *  汇率转换
 *
 *  @param camount      需要转换的金额
 *  @param fromMoney    要换算的货币
 *  @param toMoney      换算后的货币
 *  @param successBlock 请求数据成功后执行的block 回调
 *  @param failBlock    请求数据失败后执行的block
 */
+ (void)requestCurrencyByCamount:(NSString *)camount
                       fromMoney:(NSString *)fromMoney
                         toMoney:(NSString *)toMoney
                    successBlock:(void (^)(NSString *result))successBlock
                       failBlock:(void (^)(NSError *error))failBlock;


@end
